import {defineStore} from 'pinia'
import {ref} from 'vue'

export const userOrderState = defineStore(
    'wxzOrder', () => {

        const order = ref('')
        const setOrder = (newValues) => {
            order.value = newValues
        }

        const upload = ref('')
        const setUpload = (newValues) => {
            upload.value = newValues
        }

        const clear = () => {
            order.value = ''
            upload.value = ''
        }
        return {
            order,
            setOrder,
            upload,
            setUpload,
            clear
        }
    },
    {
        persist: true
    }
)
